namespace C4F.DevKit.Bluetooth.ObjectPushProfile
{
    #region Using Directives
    using System;
    using System.Runtime.Serialization;
    #endregion

    /// <summary>
    /// Exception class. This exception is thrown by an ObjectTypeVerifier when
    /// the object received is invalid.
    /// </summary>
    [Serializable]
    public class OPPTypeMismatchException : Exception
    {
        #region Public Functions/Methods

        /// <summary>
        /// Initializes the Message property of the new instance to a 
        /// system-supplied message.
        /// </summary>
        public OPPTypeMismatchException()
            : base()
        { }

        /// <summary>
        /// Initializes an object of this class and sets the Message property 
        /// to the specified error message.
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        public OPPTypeMismatchException(string message)
            : base(message)
        { }

        /// <summary>
        /// Initializes a new instance of the Exception class with a specified
        /// error message and a reference 
        /// to the inner exception that is the cause of this exception.
        /// </summary>
        /// <param name="message">The message that describes the error.</param>
        /// <param name="innerException">The exception that is the cause of 
        /// this exception.</param>
        public OPPTypeMismatchException(string message, Exception innerException)
            : base(message, innerException)
        { }

        /// <summary>
        /// Initializes a new instance of this class with serialized data.
        /// </summary>
        /// <param name="info">The SerializationInfo that holds the serialized
        /// object data about the exception being thrown.</param>
        /// <param name="context">The StreamingContext that contains contextual
        /// information about the source or destination.</param>
        protected OPPTypeMismatchException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        { }

        #endregion
    }
}